package com.csj.cloud.user.receiver;

import com.csj.cloud.common.entity.User;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Author:ChengshaoJie
 * @Description:
 * @Date:Created in 下午 7:25 2019/11/19 0019
 */
@Component
public class UserService {
    //监听器监听指定的Queuet
    @RabbitListener(queues="tQueue")
    public void processUserReg(User user) {
        System.out.println("Receive1t111=====:" + user.getAge());
    }
    //监听器监听指定的Queue
    @RabbitListener(queues = "tQueue2")
    public void processUserReg2(User user) {
        System.out.println("Receive2222======:" + user.getAge());
    }


    //监听器监听指定的Queue
    @RabbitListener(queues = "fQueue1")
    public void processUserReg3(User user) {
        System.out.println("Receive1111======:" + user.getAge());
    }
    //监听器监听指定的Queue
    @RabbitListener(queues = "fQueue2")
    public void processUserReg4(User user) {
        System.out.println("Receive2222======:" + user.getAge());
    }
}
